package threading;



public class ThreadDemo6Join {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(()-> {
            System.out.println("hello t");
        });
        t.start();

        //此处有一个异常抛出，要加上
        //在main线程中调用t.join ，那就是main线程等待t线程结束，main线程在执行
        t.join();

        System.out.println("hello main");
    }
}
